High-Level Code Optimization
نویسنده
چکیده
Software systems are inherently complex. Building large software systems has proved so difficult precisely because of the complexity levels with which programmers have to deal. In [7] Brooks divides complexity in essential and accidental and argues that solutions which worked in other fields cannot apply to software. Essential complexity stems from very nature of software (i.e. the large number of states, changeability, invisibility), while accidental complexity comes from the abstraction gap between problem domain and the low level operations provided by the hardware. An important step forward are high-level languages, which help minimize accidental complexity and give good tools to manage essential complexity through abstraction. Functional and object–oriented languages provide good means for abstraction, but such features come at a cost: they are generally slower than traditional, imperative languages like C and Fortran. This can make developers avoid some of the costly constructions, or even rely on the afore-mentioned languages for reasons of efficiency (system programming comes as a good example), which of course hurts maintainability and understandability of such programs. Optimization should remove as much as possible from the cost associated with the use of high–level constructs—especially in the cases when their added flexibility is never used. Ideally the programmer should “only pay for what he uses”. Traditional optimization techniques [1] work well for improving computational inefficiency of the kind encountered in imperative constructs, but fall short in the face of closures, polymorphic calls, generics, etc. features commonly found in modern programming languages. They require specific methods that operate at a similar level of abstraction, rather than the “raw” processor model (which concerns arithmetic operations or register manipulations). Scala[10] is a new language that fuses concepts from object-oriented and functional languages. It provides features such as higher order functions, closures, currying, pattern matching, which are commonly found in functional languages, but also classes and objects, a powerful mix-in composition as replacement for multiple inheritance – the object–oriented features. All these are complemented by a powerful type system, that allows to express programs in a concise and elegant, yet type-safe way [12]. The current implementation suffers from the previously noted inefficiencies, and provides good ground for implementation and evaluation of optimization techniques that target such constructs. It is the goal of this thesis to design and test several optimizations for Scala and evaluate their performance with respect to the current implementation.
منابع مشابه
Combining code motion and schedulingLuiz
| This work addresses a resource-constrained optimization problem which arises in the context of the high-level synthesis of an ASIC or in the code generation for an ASIP. For a given behavioral description containing conditional constructs , scheduling and code motion are combined and encoded in the form of a uniied optimization problem. As taking code motion into account may lead to a larger ...
متن کاملA Box-Behnken experimental design for microwave assisted extraction optimization of pectin from citron peel
Microwave assisted extraction technique was employed to extract pectin from citron peel. Box-Behnken design was applied to investigate the influence of irradiation time, microwave power and pH on the yield and DE of pectin. The finding indicated that the optimal conditions for the maximum yield of pectin (30.71%) were achieved at irradiation time of 3 min, microwave power of 700 W and pH of 1.5...
متن کاملCode optimization techniques for micro-code compilers
With the ever expanding volume of system functions directly implemented in microcode and the growth of microprocessor applications, it has become necessary to design high level language compilers for these machines to achieve high programming productivity. However, because of the very low level architecture of many of these machines, compilers that generate efficient code for these machines hav...
متن کاملComilation of a Highly Parallel Actor-Based Language
Hal incorporates a number of high-level language constructs such as the incremental specialization of synchronization constraints to maintain the consistency of actors at run-time, the inheritance of both code and synchronization constraints, and limited reeective capabilities to customize the system with respect to fault tolerance. This paper describes some issues in compiling Hal, and, in par...
متن کاملDETERMINATION OF OPTIMAL DISTANCE BETWEEN TWO ADJACENT STEEL FRAMES CONSIDERING STRUCTURE-SOIL-STRUCTURE INTERACTION EFFECTS USING PSO
This paper aims to obtain the optimal distance between the adjacent structures using Particle Swarm Optimization (PSO) algorithm considering structure-soil-structure systems; The optimization algorithm has been prepared in MATLAB software and connected into OpenSees software (where the structure-soil-structure system has been analyzed by the direct approach). To this end, a series of adjacent s...
متن کاملIn search of a program generator to implement generic transformations for high-performance computing
The quality of compiler-optimized code for high-performance applications lags way behind what optimization and domain experts can achieve by hand. This paper explores in-between solutions, besides fully automatic and fully-manual code optimization. This work discusses how generative approaches can help the design and optimization of supercomputing applications. It outlines early results and res...
متن کامل